Solr Installation - Creating a Task via Task Scheduler

This topic assumes you have already completed the following steps in regards to the installation of Solr on your KommerceServer web server.

  1. Install Java on your web server (you can skip this step if Java is already installed).
  2. Install version 5.4.1 of Apache Solr.
  3. Create a core directory on the Apache Solr UI.
  4. Copy core configuration files to your Solr directory.
  5. Update the db-data-config file with your database connection information.
  6. Start Solr from the Solr/bin directory.
  7. Create a Solr Core.
  8. Perform a full data import using the Solr UI.
  9. Modify the web.config file in KommerceServer.

Once you have performed the steps above, you will need to create a task via the Task Scheduler application in order to ensure that Solr is automatically started any time the web server is rebooted. Perform the following steps to create a new task using the task scheduler.

  1. Open the Task Scheduler application on your KommerceServer web server. The Task Scheduler window appears.

  1. Click the Create Task... option in the Actions area of the Task Scheduler window. A Create Task window appears.

  1. Enter a name for the task in the Name field. For this example, we are entering Task Solr Search.
  2. Select the Run whether user is logged in or not radio button.
  3. Click the Triggers tab. The Triggers window appears.

  1. Click the New button. The New Trigger window appears.

  1. Select the At startup option from the Begin the task drop-down menu.
  2. Click OK. The New Trigger window closes.
  3. Click the Actions tab. The Actions window appears.

  1. Click the New button. The New Action window appears.

  1. Click the Browse button and navigate to the location that your solr-5.4.1 files are stored in.
  2. Open the bin directory.
  3. Double-click the solr.cmd file.
  4. Type start in the Add arguments (optional) field.
  5. Click OK. The New Action window closes.
  6. Click the Conditions tab. The Conditions window opens

  1. De-select the Start the task only if the computer is on AC power checkbox.
  2. Click the Settings tab. The Settings window appears.

  1. Select the Run task as soon as possible after a scheduled start is missed checkbox.
  2. Deselect the Stop the task if it runs longer than checkbox.
  3. Deselect the If the running task does not end when requested, force it to stop checkbox. Your settings on this tab should resemble those in the following example image.

  1. Click OK. Your scheduled task is now created.